package xiecheng;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

/**
 * @author le
 */
public class Test03
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        String res;

        String _n;
        try {
            _n = in.nextLine();
        } catch (Exception e) {
            _n = null;
        }

        res = buildingHouse(_n);
        System.out.println(res);
    }

    private static String buildingHouse(String n) {
        Integer value = null;
        try{
            value = Integer.valueOf(n);
        }catch (Exception e){
            return "N";
        }
        if (value > 12 || value < 1){
            return "O";
        }
        // index == 0
        if (value == 1){
            return "R";
        }
        // // index == 0 2
        // if (value == 2){
        //     return "GRR";
        // }
        // // index == 0 2 4 6
        // if (value == 3){
        //     return "GGRRGRR";
        // }
        // // index == 0 2 4 6 8 10 12 14 2的value-1次方
        // if (value == 4){
        //     return "GGRGGRRRGGRRGRR";
        // GGRGGRRGGGRRGRRRGGRGGRRRGGRRGRR
        // }
        List<Character> res = new ArrayList<>();
        char[] tmp = new char[1];
        tmp[0] = 'R';
        char[] arr = null;
        for (int i = 2;i <= value;i++){
            arr = new char[(int)Math.pow(2, i)-1];
            System.out.println(arr.length);
            int index = 0;
            boolean flag = true;
            for (int j = 0;j < arr.length;j++){

                if (j % 2 == 0){
                    if (flag){
                        arr[j] = 'G';
                        flag = false;
                    }else{
                        arr[j] = 'R';
                        flag = true;
                    }
                }else{
                    arr[j] = tmp[index];
                    index++;
                }
            }
            tmp = arr;
        }
        StringBuilder sb = new StringBuilder();
        for (char s : arr){
            sb.append(s);
        }
        return sb.toString();
    }
}
